package com.hk.button;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import com.hk.global.ImageUrl;

public class ButtonRegame extends SuperButton {
//	private int x = 500;
//	private int y = 400;
	private int x = 720;
	private int y = 50;
	private int w = 110;
	private int h = 110;
	
	public ButtonRegame() {
		BoundsButton(x, y, w, h);
		SetButtonIcon(ImageUrl.B_REPLAY);
	}
	
	@Override
	protected void ActionButton() {
		button.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				if (pg.isEnd()) {
					ngLab.setWinnerLab("");
					pg.Reset();
					ct.CardTakeReSet();
					ngLab.updateLabel();
				}
			}
		});
	}
	@Override
	public void HideButton() {
		BoundsButton(x, y, w, h);
	}
	@Override
	public void ShowButton() {
		BoundsButton(0, 0, 0, 0);
	}
	@Override
	public JButton getButton() {
		return button;
	}
}
